<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Swift_Connection</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Swift_Connection</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|													<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Swift Connection Interface</p>
<p class="description"><p>Lists methods which are required by any connections</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Chris Corbyn &lt;<a href="mailto:chris@w3style.co.uk">chris@w3style.co.uk</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Swift---Connection.php.html">/Swift/Connection.php</a> (line <span class="field">18</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Swift_Connection/Swift_ConnectionBase.html">Swift_ConnectionBase</a></td>
					<td>
											Swift Connection Base Class
										</td>
				</tr>
							</table>
		</div>
	</div>



	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																												
												<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getAttributes" title="details" class="method-name">getAttributes</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#getRequiresEHLO" title="details" class="method-name">getRequiresEHLO</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#hasExtension" title="details" class="method-name">hasExtension</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#isAlive" title="details" class="method-name">isAlive</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#postConnect" title="details" class="method-name">postConnect</a>
											(<span class="var-type"><a href="../Swift/Swift.html">Swift</a></span>&nbsp;<span class="var-name">$instance</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#read" title="details" class="method-name">read</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setExtension" title="details" class="method-name">setExtension</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$list</span> = <span class="var-default">array()</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setRequiresEHLO" title="details" class="method-name">setRequiresEHLO</a>
											(<span class="var-type">boolean</span>&nbsp;<span class="var-name">$set</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#start" title="details" class="method-name">start</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#stop" title="details" class="method-name">stop</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#write" title="details" class="method-name">write</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$command</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodgetAttributes" id="getAttributes"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getAttributes</span> (line <span class="line-number">65</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the list of attributes for the extension $name</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Swift_ConnectionException If no such extension can be found</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getAttributes
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the extension</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_ConnectionBase.html#methodgetAttributes">Swift_ConnectionBase::getAttributes()</a>
								: Get the list of attributes supported by the given extension
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodgetAttributes">Swift_Connection_Multi::getAttributes()</a>
								: Call the current connection's getAttributes() method
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodgetAttributes">Swift_Connection_Rotator::getAttributes()</a>
								: Call the current connection's getAttributes() method
							</li>
				</ul>
	</div>
<a name="methodgetRequiresEHLO" id="getRequiresEHLO"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getRequiresEHLO</span> (line <span class="line-number">75</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns TRUE if the connection needs a EHLO greeting.</p>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			getRequiresEHLO
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_ConnectionBase.html#methodgetRequiresEHLO">Swift_ConnectionBase::getRequiresEHLO()</a>
								: Returns TRUE if the connection needs a EHLO greeting.
							</li>
				</ul>
	</div>
<a name="methodhasExtension" id="hasExtension"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">hasExtension</span> (line <span class="line-number">58</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if an extension exists by the name $name</p>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			hasExtension
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the extension</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_ConnectionBase.html#methodhasExtension">Swift_ConnectionBase::hasExtension()</a>
								: Check if a given extension has been set as available
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodhasExtension">Swift_Connection_Multi::hasExtension()</a>
								: Call the current connection's hasExtension() method
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodhasExtension">Swift_Connection_Rotator::hasExtension()</a>
								: Call the current connection's hasExtension() method
							</li>
				</ul>
	</div>
<a name="methodisAlive" id="isAlive"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isAlive</span> (line <span class="line-number">46</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if the connection is up or not</p>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			isAlive
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodisAlive">Swift_Connection_Multi::isAlive()</a>
								: Check if the current connection is alive
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_NativeMail.html#methodisAlive">Swift_Connection_NativeMail::isAlive()</a>
								: Check if the process is still alive
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodisAlive">Swift_Connection_Rotator::isAlive()</a>
								: Check if the current connection is alive
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Sendmail.html#methodisAlive">Swift_Connection_Sendmail::isAlive()</a>
								: Check if the process is still alive
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_SMTP.html#methodisAlive">Swift_Connection_SMTP::isAlive()</a>
								: Check if the SMTP connection is alive
							</li>
				</ul>
	</div>
<a name="methodpostConnect" id="postConnect"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">postConnect</span> (line <span class="line-number">70</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Execute logic needed after SMTP greetings</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			postConnect
		</span>
					(<span class="var-type"><a href="../Swift/Swift.html">Swift</a></span>&nbsp;<span class="var-name">$instance</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../Swift/Swift.html">Swift</a></span>
				<span class="var-name">$instance</span><span class="var-description">: An instance of Swift</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_ConnectionBase.html#methodpostConnect">Swift_ConnectionBase::postConnect()</a>
								: Execute any needed logic after connecting and handshaking
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodpostConnect">Swift_Connection_Multi::postConnect()</a>
								: Call the current connection's postConnect() method
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_NativeMail.html#methodpostConnect">Swift_Connection_NativeMail::postConnect()</a>
								: Sets the MailSend plugin in Swift once Swift has connected
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodpostConnect">Swift_Connection_Rotator::postConnect()</a>
								: Call the current connection's postConnect() method
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_SMTP.html#methodpostConnect">Swift_Connection_SMTP::postConnect()</a>
								: Authenticate if required to do so
							</li>
				</ul>
	</div>
<a name="methodread" id="read"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">read</span> (line <span class="line-number">30</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the contents of the buffer</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Swift_ConnectionException If the buffer cannot be read</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			read
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodread">Swift_Connection_Multi::read()</a>
								: Read a full response from the buffer
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_NativeMail.html#methodread">Swift_Connection_NativeMail::read()</a>
								: Read a full response from the buffer (this is spoofed if running in -t mode)
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodread">Swift_Connection_Rotator::read()</a>
								: Read a full response from the buffer
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Sendmail.html#methodread">Swift_Connection_Sendmail::read()</a>
								: Read a full response from the buffer (this is spoofed if running in -t mode)
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_SMTP.html#methodread">Swift_Connection_SMTP::read()</a>
								: Read a full response from the buffer
							</li>
				</ul>
	</div>
<a name="methodsetExtension" id="setExtension"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setExtension</span> (line <span class="line-number">52</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add an extension which is available on this connection</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setExtension
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$list</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the extension</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$list</span><span class="var-description">: The list of attributes for the extension</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_ConnectionBase.html#methodsetExtension">Swift_ConnectionBase::setExtension()</a>
								: Set an extension which the connection reports to support
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodsetExtension">Swift_Connection_Multi::setExtension()</a>
								: Call the current connection's setExtension() method
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodsetExtension">Swift_Connection_Rotator::setExtension()</a>
								: Call the current connection's setExtension() method
							</li>
				</ul>
	</div>
<a name="methodsetRequiresEHLO" id="setRequiresEHLO"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setRequiresEHLO</span> (line <span class="line-number">80</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set if the connection needs a EHLO greeting.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRequiresEHLO
		</span>
					(<span class="var-type">boolean</span>&nbsp;<span class="var-name">$set</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$set</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_ConnectionBase.html#methodsetRequiresEHLO">Swift_ConnectionBase::setRequiresEHLO()</a>
								: Set TRUE if the connection needs a EHLO greeting.
							</li>
				</ul>
	</div>
<a name="methodstart" id="start"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">start</span> (line <span class="line-number">24</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Try to start the connection</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Swift_ConnectionException If the connection cannot be started</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			start
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodstart">Swift_Connection_Multi::start()</a>
								: Try to start the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_NativeMail.html#methodstart">Swift_Connection_NativeMail::start()</a>
								: Try to start the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodstart">Swift_Connection_Rotator::start()</a>
								: Try to start the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Sendmail.html#methodstart">Swift_Connection_Sendmail::start()</a>
								: Try to start the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_SMTP.html#methodstart">Swift_Connection_SMTP::start()</a>
								: Try to start the connection
							</li>
				</ul>
	</div>
<a name="methodstop" id="stop"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">stop</span> (line <span class="line-number">41</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Try to stop the connection</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Swift_ConnectionException If the connection cannot be closed/stopped</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			stop
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodstop">Swift_Connection_Multi::stop()</a>
								: Try to close the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_NativeMail.html#methodstop">Swift_Connection_NativeMail::stop()</a>
								: Try to close the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodstop">Swift_Connection_Rotator::stop()</a>
								: Try to close the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Sendmail.html#methodstop">Swift_Connection_Sendmail::stop()</a>
								: Try to close the connection
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_SMTP.html#methodstop">Swift_Connection_SMTP::stop()</a>
								: Try to close the connection
							</li>
				</ul>
	</div>
<a name="methodwrite" id="write"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">write</span> (line <span class="line-number">36</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Write a command to the buffer</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Swift_ConnectionException If the write fails</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			write
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$command</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$command</span><span class="var-description">: The command to send</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Connection/Swift_Connection_Multi.html#methodwrite">Swift_Connection_Multi::write()</a>
								: Write a command to the server (leave off trailing CRLF)
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_NativeMail.html#methodwrite">Swift_Connection_NativeMail::write()</a>
								: Write a command to the process (leave off trailing CRLF)
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Rotator.html#methodwrite">Swift_Connection_Rotator::write()</a>
								: Write a command to the server (leave off trailing CRLF)
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_Sendmail.html#methodwrite">Swift_Connection_Sendmail::write()</a>
								: Write a command to the process (leave off trailing CRLF)
							</li>
					<li>
				<a href="../Swift_Connection/Swift_Connection_SMTP.html#methodwrite">Swift_Connection_SMTP::write()</a>
								: Write a command to the server (leave off trailing CRLF)
							</li>
				</ul>
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 26 Mar 2008 20:33:44 +1100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.1</a>
	</p>
	</div></body>
</html>